
PenMount for Fedora

==========
 Overview
==========
  The following Fedora version were tested.
  . Fedora Core 5
  . Fedora Core 6
  . Fedora Core 7



===============
 Control Board
===============
PenMonut 9000
  Interface : Serial port
  Baudrate  : 19200 / 9600 bps
  
PenMount 5000
  Interface : USB port (low speed)

PenMount 6000 COM
  Interface : Serial Port
  Baudrate  : 19200 / 9600 bps

PenMount 6000 USB
  Interface : USB port (full speed)


===========
 File List
===========
xdrv-adv/
  - penmount_drv.so
    X.Org input driver for PenMount multi-point version

xdrv-std/
  - penmount_drv.o
    X.Org input driver for PenMount 4-point version

adv-calib
    Advanced calibration utility (multi-point)

std-calib
    Standard calibration utility (4-points)

std-calib-src/
    Standard calibration utility source code

pm-setup
    PenMount setup utility. It can configure the PenMount
    driver and X configuration file (/etc/X11/xorg.conf)

pm-sniff
    PenMount sniffer. A debug utility for checking PenMount
    on serial port. The utility works without PenMount
    driver. Make sure that the driver is unloaded before
    using it. 

pm-report
    Collect some informations for debugging to PenMount. If you
    have any problems about PenMount, you can issue the
    following command as root.

    # ./pmreport > pmreport.log

    Then send back the log file pmreport.log to PenMount.
    <mailto://penmount@seed.net.tw>

README-fedora
    You're reading now.

===============
 Quick Install
===============
  1. Login as root in Fedora login prompt
  2. Open terminal (Applications->Accessories->Terminal)
  3. Get the tarball file (pmlinux-fedora-xxxxx.tgz)
  4. Extract the tarball (tar xvfz pmlinux-fedora-20070628.tgz)
  5. Change directory (cd pmlinux-fedora)
  6. Installation (./install.sh)
  7. Restart X window

==================
 Re-Configuration
==================
  Run ./pm-setup

===========================
 How to Calibrate PenMount
===========================
1. Login as root

2. Fedora (Application) --> Accessories --> Terminal

3. cd pmlinux-fedora
   (e.g. if pmlinux-fedora is extracted directory.)

4.
   # ./adv-calib [4|9|16|25]
   If advanced driver was installed. 4 is 4-point, 9 is 9-point and so on.
   or
   # ./std-calib
   If standard driver was installed.

   P.S. You must login as root, otherwise it doesn't work.

5. Touch the red points

6. After calibration, the calibration data will be stored at
   /etc/penmount.dat. Please don't modify it.

==========
 COM port 
==========
1. Device Node
   o 16550-compatible UART
     /dev/ttyS0   COM1
     /dev/ttyS1   COM2
     /dev/ttyS2   COM3
     /dev/ttyS3   COM4
     .......
   o USB-to-serial port
     /dev/ttyUSB0
     /dev/ttyUSB1
     .......

2. If the COM port was not working, you may config COM port setting,
   for example:
   o setup COM3 irq 5 and I/O 3E8h
     setserial /dev/ttyS2 irq 5 port 0x03e8
   o In Fedora Core 5, SuSE 10.0 and SuSE 10.1, setup COM3
     setserial /dev/ttyS2 irq 0
     (It's weird that irq is 0, but it really worked!)

3. Reconfig COM port at booting
   o In Fedora Core 5, SuSE 10.0 and SuSE 10.1
     edit /etc/rc.d/rc.serial (vim /etc/rc.d/rc.serial)
     add 'setserial /dev/ttyS[23] irq 0' in the tail of file.
     save file

   You'll also do the followings

   o create /etc/rc.d/init.d/penmount, like this:
     --- Start of penmount ---
     #!/bin/bash
     setserial /dev/ttyS2 irq 5
     --- End of penmount ---

   o create a link in /etc/rc5.d
     cd /etc/rc5.d
     ln -s ../rc.d/init.d/penmount S99penmount


=====
 FAQ
=====
(1) PenMount is not working, how can I do?

Ans:
     <1> Use pm-sniff or pm-sniff-usb to check the PenMount was connected.

     <2> Run ./pm-setup to re-config PenMount

     <3> Press Ctrl+Alt+Backspace to reload X window.

     <4> In Ubuntu, you can try the followings:

         Remove the configurations of X about wacom (/etc/X11/xorg.conf)
         In the section 'ServerLayout', please add '#' at head of line
         
         Section "ServerLayout"
         ..............
         #       InputDevice      "stylus"        "SendCoreEvents"
         #       InputDevice      "cursor"        "SendCoreEvents"
         #       InputDevice      "erasor"        "SendCoreEvents"
         ...............
         EndSection

     <5> To make sure the PenMount USB driver (usbhid) is loaded.

         Issue the following command:
         # more /proc/bus/usb/devices

         You will see like this:
         ....................
         P:  Vendor=14e1 ProdID=6000 Rev=a4.b4
         S:  Manufacturer=DIALOGUE INC
         S:  Product=PenMount USB
         ......................
         I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
         ........................

         where :
         'Driver=usbhid' :  It means the driver was loaded.
         'Driver=(none)' :  It means the driver was NOT loaded.

         If the file /proc/bus/usb/devices is disappear, you can try
         the command:
         # mount -t usbdevfs none /proc/bus/usb

         The file is still disppear, it means the kernel without 
         'USB device filesystem'. 

     <6> Make sure the input driver is loaded.
 
         Issue the following command:
         # more /proc/bus/input/devices

         You will see like this:
         ....................
         I: Bus=0003 Vendor=14e1 Product=6000 Version=0001
         N: Name="DIALOGUE INC PenMount USB"
         ....................
         H: Handlers=event2 js0

         The handler 'event2' that means the device at
         /dev/input/event2, you can issue the command for checking

         # xxd /dev/input/event2

         Touch the panel and it will show something on the screen.
-----------------------------------------------------------------------
(2) Does PenMount support COM3/COM4 ?
Ans:
   For FC5, SuSE 10.0, SuSE 10.1,
   Add 'setserial /dev/ttyS[23] irq 0' into /etc/rc.d/rc.serial

   For FC2, FC3 and FC4, you have to do nothing.

   For Slackware, the COM3/4 IRQ error!
   Issue the command :
      # setserial /dev/ttyS[23] irq [5 | 10]
-----------------------------------------------------------------------
(3) I have problem in FC6 for PenMount serial.
Ans:
   The device node /dev/ttyS? is gone!
   We try to find out the solution....


-----------------------------------------------------------------------
(4) When I touch the PenMount, the system is halted.
Ans:

se remove the FIFO file.

     # rm /tmp/penomount_cmd
     # rm /tmp/penomount_dat

-----------------------------------------------------------------------
(5) When I compile the penmount.o , it failed.
Ans:
    Make sure the /usr/src/linux is the top directory of linux source code.
    You can make a symbolic link like :

    cd /usr/src
    ln -s linux-2.4 linux  (RedHat)


===================================================================
DIALOGUE INTERATIONAL CORP.
June 29, 2007

